﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ResidentesFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ResidentesBE
        Dim tmpResidentes As ResidentesBE = New ResidentesBE()
        Try
            With tmpResidentes
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))
                .IdAuto = convertDTFromDb.convertInt32(dr.Item("IdAuto"))
                .IdBodega = convertDTFromDb.ConvertShort(dr.Item("IdBodega"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .IdRes = convertDTFromDb.convertInt32(dr.Item("IdRes"))
                .Nombre = convertDTFromDb.ConvertString(dr.Item("Nombre"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .Tel = convertDTFromDb.ConvertString(dr.Item("Tel"))
            End With
            Return tmpResidentes
        Catch ex As Exception
            Throw
        Finally
            tmpResidentes = Nothing
        End Try
    End Function
End Class
